use std::collections::HashSet;

pub fn new_count_distinct(input_str: &str) -> usize {
    let mut distinct_set = HashSet::new();  //用hashset自动去重
    
    // 通过逗号分割输入字符串，并插入到 HashSet 中
    for i in input_str.split(',') {
        distinct_set.insert(i);
    }
    distinct_set.len()
}